// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import axios from 'axios'
import Moment from 'moment'
import VuePreview from 'vue-preview'
import App from './App'
import router from './router'

import './lib/css/mui.min.css'
import './lib/css/icons-extra.css'
import 'mint-ui/lib/style.css'

// Mint-UI中的组件
import Comment from './components/comment'
import { Header, Toast, Swipe, SwipeItem, Button, Lazyload } from 'mint-ui'
Vue.use(Lazyload);
Vue.use(VuePreview);
Vue.prototype.axios = axios;
Vue.component(Header.name, Header)
Vue.component(Swipe.name, Swipe)
Vue.component(Toast.name, Toast);
Vue.component(SwipeItem.name, SwipeItem);
Vue.component(Button.name, Button);
Vue.component(Comment.name,Comment);
Vue.filter('dateFormat',(dataStr,pattern) =>{
    return Moment(dataStr).format(pattern);
});
Vue.config.productionTip = false

new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
